package com.sanmina.tms.dao.impl;

import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.sanmina.tms.dao.PersonnelDao;
import com.sanmina.tms.entity.Personnel;

@Repository
public class PersonnelDaoImpl extends SqlSessionDaoSupport implements
		PersonnelDao {

	@Override
	public Personnel getById(Integer id) {
		return this.getSqlSession().selectOne(
				"com.sanmina.tms.entity.Personnel.getById", id);

	}

	@Override
	@Autowired
	public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {
		super.setSqlSessionFactory(sqlSessionFactory);
	}
}
